package com.song.user.controller;

import com.song.user.stream.MessageProvider;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = {"测试"})
@RestController
@RequestMapping("/stream")
public class StreamController {
    @Autowired
    private MessageProvider messageProvider;

    @PostMapping("sendMessage")
    public boolean sendMessage(String message){
        return messageProvider.sendMessage(message);
    }

    @PostMapping("sendLog")
    public boolean sendLog(String message){
        return messageProvider.sendLog(message);
    }
}
